Optimal. Leaf size=28 \[ -\frac {(a-b) \cos (e+f x)}{f}+\frac {b \sec (e+f x)}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3745, 14}
\begin {gather*} \frac {b \sec (e+f x)}{f}-\frac {(a-b) \cos (e+f x)}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 3745
Rubi steps
\begin {align*} \int \sin (e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx &=\frac {\text {Subst}\left (\int \frac {a-b+b x^2}{x^2} \, dx,x,\sec (e+f x)\right )}{f}\\ &=\frac {\text {Subst}\left (\int \left (b+\frac {a-b}{x^2}\right ) \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac {(a-b) \cos (e+f x)}{f}+\frac {b \sec (e+f x)}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 46, normalized size = 1.64 \begin {gather*} -\frac {a \cos (e) \cos (f x)}{f}+\frac {b \cos (e+f x)}{f}+\frac {b \sec (e+f x)}{f}+\frac {a \sin (e) \sin (f x)}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 52, normalized size = 1.86
method | result | size |
derivativedivides | \(\frac {b \left (\frac {\sin ^{4}\left (f x +e \right )}{\cos \left (f x +e \right )}+\left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )\right )-\cos \left (f x +e \right ) a}{f}\) | \(52\) |
default | \(\frac {b \left (\frac {\sin ^{4}\left (f x +e \right )}{\cos \left (f x +e \right )}+\left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )\right )-\cos \left (f x +e \right ) a}{f}\) | \(52\) |
risch | \(-\frac {{\mathrm e}^{i \left (f x +e \right )} a}{2 f}+\frac {{\mathrm e}^{i \left (f x +e \right )} b}{2 f}-\frac {{\mathrm e}^{-i \left (f x +e \right )} a}{2 f}+\frac {{\mathrm e}^{-i \left (f x +e \right )} b}{2 f}+\frac {2 b \,{\mathrm e}^{i \left (f x +e \right )}}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}\) | \(90\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 34, normalized size = 1.21 \begin {gather*} \frac {b {\left (\frac {1}{\cos \left (f x + e\right )} + \cos \left (f x + e\right )\right )} - a \cos \left (f x + e\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.98, size = 33, normalized size = 1.18 \begin {gather*} -\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} - b}{f \cos \left (f x + e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan ^{2}{\left (e + f x \right )}\right ) \sin {\left (e + f x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.58, size = 41, normalized size = 1.46 \begin {gather*} b {\left (\frac {\cos \left (f x + e\right )}{f} + \frac {1}{f \cos \left (f x + e\right )}\right )} - \frac {a \cos \left (f x + e\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.78, size = 39, normalized size = 1.39 \begin {gather*} \frac {\left (\cos \left (e+f\,x\right )+1\right )\,\left (b-a\,\cos \left (e+f\,x\right )+b\,\cos \left (e+f\,x\right )\right )}{f\,\cos \left (e+f\,x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________